home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / DB_CLIPP / H190.ZIP / VERTEX1.EXE / COLOR.PRG < prev    next >
Text File  |  1992-09-12  |  2KB  |  63 lines

  1. //--------------------------------------------------------------------------
  2. *   Function:   COLOR() --> NIL
  3. *
  4. *   Synopsis:   The program will first call the META function MFPICKCOLOR()
  5. *               and provides You with a set of predefined colors.
  6. *
  7. *               ALL META functions make use of many VERTEX functions. The
  8. *               Boxes for instance are created using the BXBOX() function,
  9. *               Menus are created using the MNCHOICE() function and
  10. *               the MFSETCOLOR() META function also makes use of the
  11. *               MNPULLDN() function.
  12. *
  13. *               The MFSETCOLOR() function allows You to change not only the
  14. *               colors but also the appearance of the boxes.
  15. *
  16. *               The information is stored in a file called SYSTEM.DAT
  17. *
  18. *               Deleting this file causes the program to start up in the
  19. *               default color mode.
  20. *
  21. *               To compile this program, use the provided sample MAKE
  22. *               scripts 
  23. *                       COLORBL.RMK for BLINKER      or
  24. *
  25. *                       COLORRT.RMK for RTLINK
  26. *
  27. *               and create it by calling:
  28. *
  29. *                       RMAKE COLORBL       (if using BLINKER)
  30. *
  31. *               or calling
  32. *
  33. *                       RMAKE COLORRT       (if using RTLINK)
  34. //---------------------------------------------------------------------------
  35.  
  36. FUNCTION color
  37. LOCAL   lScrSave    := "",;             && saved screen
  38.         lCurrCol    := COL(),;          && current cursor position (COLUMN)
  39.         lCurrRow    := ROW()            && current cursor position (ROW)
  40.  
  41.  
  42. lScrSave := SAVESCREEN( 0, 0, MAXROW(), MAXCOL() )
  43.  
  44.  
  45. utinit()                                && must be used as first function
  46.                                         && to initialize drivers and globals
  47.                                         && needed....
  48.  
  49. VICLS( 120,CHR(176) )                   && clear the screen
  50.  
  51. mfpickcolor()                           && pick a provided colorscheme
  52.  
  53. mfsetcolor()                            && call color setting function
  54.  
  55.  
  56.                                         && slide screen off........
  57. VISLIDEOFF( 0, 0, MAXROW(), MAXCOL(), lScrSave, 1 )
  58.  
  59. DEVPOS( lCurrRow, lCurrCol )            && reset cursor to old position
  60.  
  61. RETURN NIL
  62.  
  63.